
namespace Needle.Framework
{

    /// <summary>
    /// Provides methods to activate and deactivate an object, the object should support multiple start/stop cycles.
    /// </summary>
    public interface IStartable
    {

        /// <summary>
        /// Activate the object (e.g. start a listener or thread). 
        /// If the object was already started this method should do nothing.
        /// </summary>
        void Start();

        /// <summary>
        /// Deactivate the object. If the object was already stopped, this method should do nothing.
        /// </summary>
        void Stop();
    }
}
